<script setup lang="ts">
import { Overlay, Loading } from "vant";
const props = defineProps({
    show: {
        type: Boolean,
        default: false
    },
    text: {
        type: String,
        default: "加载中..."
    },
    textColor: {
        type: String,
        default: "#1989fa"
    }
});
</script>
<template>
    <Overlay :show="props.show" :z-index="100">
        <div class="loading-overlay-wrapper" @click.stop>
            <div class="block">
                <Loading :color="textColor" vertical>{{ text }}</Loading>
            </div>
        </div>
    </Overlay>
</template>
<style scoped lang="less">
.loading-overlay-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;

    .block {
        width: 120px;
        height: 120px;
        background-color: #fff;
        border-radius: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}
</style>
